/*
 * File     : Callback.java
 * Created  : 1 May 2011
 *
 * Copyright © 2011 Matthew Wilson (mj. {my-surname} .uk {at} gmail.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.googlecode.dni.callback;

import com.googlecode.dni.library.CallingConvention;
import com.googlecode.dni.library.Library;


/**
 * <p>
 *  Annotates an interface as a call-back.
 * </p>
 * <p>
 *  The annotated type must be an interface.  The interface must have no
 *  super-interfaces.  The interface must define precisely one method that is
 *  not named after a method on {@link Object}.  That method's prototype is used
 *  as the call-back's prototype.
 * </p>
 *
 * TODO v1.0 DOCUMENT
 *
 * @author Matthew Wilson
 */
public @interface Callback
{

    /**
     * <p>
     *  The default calling conventions for this library.
     * </p>
     * <p>
     *  The calling convention can be overridden on a per-method basis.
     * </p>
     *
     * @return the calling conventions
     */
    CallingConvention callingConvention() default CallingConvention.PLATFORM_DEFAULT;

    /**
     * <p>
     *  The character set name to use.
     * </p>
     * <p>
     *  By default, the platform character set is chosen.
     * </p>
     *
     * @return the character set name
     */
    String charset() default Library.DEFAULT_CHARSET;

}
